/*
 * MainGame.h
 *
 *  Created on: Oct 20, 2012
 *      Author: Administrator
 */

#ifndef MAINGAME_H_
#define MAINGAME_H_

#include <QObject>
#include <bb/cascades/AbstractPane>
#include <bb/cascades/Color>
#include <bb/cascades/Container>
#include <bb/cascades/DockLayout>
#include <bb/cascades/ImageView>
#include <bb/cascades/Page>
#include <bb/cascades/Slider>
#include <bb/cascades/Stacklayout>
#include <bb/cascades/StackLayoutProperties>
#include <bb/cascades/AbsoluteLayoutProperties>
#include <bb/cascades/Label>
#include <QTimer>
#include "ShowText.h"
#include <bb/cascades/TouchBehavior>
#include <bb/cascades/TouchEvent>
#include <QList>
#include <QGlobal.h>
#include <QTime>
#include <QFile>
#include <bb/cascades/ParallelAnimation>
#include <bb/cascades/TranslateTransition>
#include <bb/cascades/FadeTransition>

namespace bb {
namespace cascades {

class MainGame {
public:
	MainGame();
	virtual ~MainGame();

private:
	QList<bb::cascades::Container*> cList;
	    QList<ShowText*> textList;

	    QList<ShowText*> gamePlayList;
	    QTimer *timer;
	    int index;
	    int interval;
	    int nowTime;
	    int containerNow;

	    void addTouchHandler();
	    void findOtherContainer();
	    void createTempData();
	    int randInt(int low, int high);
	    void setTextForContainer(QString text, int cIndex);
	    void shakeForFail(int index);
	    void createTimer();
};

} /* namespace cascades */
} /* namespace bb */
#endif /* MAINGAME_H_ */
